# -*- coding: utf-8 -*-
# @Author   : 白云酱
# Data      :
# Software  :pyCharm
# version   :python 3.10
# @File     :page_banner.py

from utils.db_util import DBUtil


class Banner:
    url = "https://m.x7sy.com"
    # 断言的xpath
    assert_xpath = "null"


    @classmethod
    def find_search_ele(cls):
        """再数据库寻找导航栏的元素"""
        sql = "select * from sy_banner where parent_id is null"
        data = DBUtil.exe_sql(sql)
        list1 = [(item.get('classification_name'),eval(item.get('locator'))) for item in data]
        return  list1

if __name__ == "__main__":
    print(Banner.find_search_ele())